package org.extplus.test.dwrstore;

public class User {

    private int id;

    private String first;

    private String last;

    private String email;

    public User() {
    }

    public User(int id, String first, String last, String email) {
        this.id = id;
        this.first = first;
        this.last = last;
        this.email = email;
    }

    public User update(String first, String last, String email) {
        if (first != null)
            this.first = first;
        if (last != null)
            this.last = last;
        if (email != null)
            this.email = email;
        return this;
    }

    public User update(User user) {
        return update(user.getFirst(), user.getLast(), user.getEmail());
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getFirst() {
        return first;
    }

    public void setFirst(String first) {
        this.first = first;
    }

    public String getLast() {
        return last;
    }

    public void setLast(String last) {
        this.last = last;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

}
